<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="${pageContext.request.contextPath}/webjars/jquery/3.7.1/jquery.min.js"></script>
    <script src="${pageContext.request.contextPath}/webjars/bootstrap/5.1.3/js/bootstrap.bundle.min.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/webjars/bootstrap/5.1.3/css/bootstrap.min.css"/>
</head>
<body>
<%request.setCharacterEncoding("UTF-8");%>
<jsp:useBean id="book" class="com.cn.domain.Book" scope="page">
    <jsp:setProperty name="book" property="*"/>
</jsp:useBean>

<%--实例化：<jsp:useBean id="stu" class="com.cn.domain.Book" scope="page"/><br/>--%>
<%--姓名：<jsp:setProperty name="stu" property="bookName" value="红楼梦"/><br/>--%>
<%--年龄：<jsp:setProperty name="stu" property="price" value="19"/><br/>--%>
<%--性别：<jsp:setProperty name="stu" property="author" value="王五"/><br/>--%>
<%--姓名：<jsp:getProperty name="stu" property="bookName"/><br/>--%>
<%--年龄：<jsp:getProperty name="stu" property="price"/><br/>--%>
<%--性别：<jsp:getProperty name="stu" property="author"/><br/>--%>

<div class="container mt-3">
    <form action="info.jsp" method="post">
        <table  class="table table-bordered text-center" style="width: 400px; height: 200px; margin: 0 auto;">
            <tr>
                <td colspan="2"><b>添加图书信息</b></td>
            </tr>
            <tr>
                <td>名称：<jsp:getProperty property="bookName" name="book"/></td>
            </tr>
            <tr>
                <td>价格：<jsp:getProperty property="price" name="book"/></td>
            </tr>
            <tr>
                <td>作者：  <jsp:getProperty property="author" name="book"/></td>
            </tr>
        </table>
    </form>
</div>
</body>
</html>